﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WFForm.Master" AutoEventWireup="true" CodeBehind="ApplyList.aspx.cs" Inherits="WF.Web.Pages.Workflow.KQ.ApplyList" %>
<%@ MasterType VirtualPath="~/WFForm.Master" %>

<%@ Register Assembly="WF.Web" Namespace="WF.Web.Controls" TagPrefix="cc1" %>
<%@ Register Src="~/Pages/UserControl/UCPager.ascx" TagName="UCPager" TagPrefix="uc1" %>
<%@ Register Src="~/Pages/UserControl/ToolBar.ascx" TagName="ToolBar" TagPrefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="server">
申请单查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Other_head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Path" runat="server">
考勤申请审批 > <asp:Label ID="lblCurrentActivityName" runat="server" Text="审批查询"></asp:Label>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Main" runat="server">
  <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/DatePicker/WdatePicker.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <div id="ToolBox">
        <uc2:toolbar ID="ToolBar1" runat="server"   EnabledRefresh="true" EnabledBack="true"/>
    </div>
   <div id="search" class="inputform">
 <table>
            <tr>
                <th>
                    申请日期：
                </th>
                <td>
                    <asp:TextBox ID="txtDateStart" runat="server" CssClass="inputdates" 
                        onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>
                    -
                    <asp:TextBox ID="txtDateEnd" runat="server" CssClass="inputdates" 
                        onfocus="WdatePicker({skin:'whyGreen'})"></asp:TextBox>
                </td>
                <th>
                    名称：
                </th>
                <td>
                    <asp:TextBox ID="txtFolio" runat="server" CssClass="inputs"></asp:TextBox>
                </td>
                <th>
                    审核状态：
                </th>
                <td>
                    <asp:DropDownList ID="ddlFlagStatus" runat="server">
                        <asp:ListItem Value="-2">全部</asp:ListItem>
                        <asp:ListItem Value="1">通过</asp:ListItem>
                        <asp:ListItem Value="-1">拒绝</asp:ListItem>
                        <asp:ListItem Value="0">审核中</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <th>
                    <asp:CheckBox ID="cbxIsMine" runat="server" Checked="false" Text="只查本人"/>
                </th>
                <td>
                    <span class="btnw">
                        <asp:Button ID="btnSearch" runat="server" Text="查 询" class="inputbtn" /></span>
                </td>
            </tr>
            <tr style="display:none">
                <td colspan="10">
                    <asp:CheckBox ID="cbxIsProtect" runat="server" Checked="True" />
                    <asp:TextBox ID="txtOperateNo" runat="server" Text="002.004.001"></asp:TextBox>
                    <asp:CheckBox ID="cbxIsCanQuery" runat="server" Checked="True" />
                </td>
            </tr>
        </table>
    </div>
    <div class="ititle">
        <h4>考勤申请列表</h4>
    </div>
    <div class="dataGrid">
        <asp:ListView ID="dataListView" runat="server" DataSourceID="ObjectDataSource1" DataKeyNames="ID"
            EnableModelValidation="true" >
            <LayoutTemplate>
                <table cellspacing="0" class="Grid">
                    <tr>
                       <th>流程名称</th>
                       <th>申请人</th> 
                       <th>申请类型</th>
                       <th>申请时间 </th>
                       <th>开始时间</th>
                       <th>结束时间</th>
                       <th>申请天数</th> 
                       <th>审核状态</th>
                       <th>审批历史</th>
                       <th>流程信息</th>  
                    </tr>
                    <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
                </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr>
                  <td>
                         <a href="#" onclick="<%# "return ShowDialog('KQApplyView.aspx?ID=" + Eval("ID") + "', 750, 550, '');"%>"><%# Eval("Folio") %></a>
                    </td>
                  
                    <td>
                        <%# Eval("ApplicantName")%>&nbsp;
                    </td>                    
                    <td>
                      <%# Eval("HoliDayTypeName")%>
                    </td>                    
                    <td>
                    <%# Eval("ApplyRegisterDate","{0:yyyy-MM-dd HH:mm:ss}") %>
                    </td>
                    <td>
                        <%# Eval("ApplyDateFrom","{0:yyyy-MM-dd}")%>&nbsp;<%# Eval("HourFrom")%>:<%# Eval("MinuteFrom") %>&nbsp;
                    </td>
                    <td>
                        <%# Eval("ApplyDateTo","{0:yyyy-MM-dd}")%>&nbsp;<%# Eval("HourTo")%>:<%# Eval("MinuteTo") %>&nbsp;
                    </td> 
                    <td>
                        <%# Eval("ApplyDays")%>
                    </td>            
                    <td>
                        <%# FormatState(Eval("FlowState").ToString())%>
                    </td>
                   <td>
                        <cc1:CCHRButton ID="Button8" runat="server" CssClass="btnViewHistory" OnClientClick=<%# "return ShowDialog('../../WorkflowInfo/AuditHistory.aspx?bizdataID=" + Eval("ID") + "', 750, 550, '');"%> ToolTip="查看申批历史" 
                            OperateNo="002.004.002" IsProtect="true" />
                    </td>
                    <td>
                        <cc1:CCHRButton ID="Button2" runat="server" CssClass="btnViewWFInfo" OnClientClick=<%# "return ShowDialog('../../WorkflowInfo/ShowStatusChart.aspx?bizdataID=" + Eval("ID") + "', window.screen.width, window.screen.height, '');"%> ToolTip="查看流程信息" 
                            OperateNo="002.004.003" IsProtect="true"/>
                    </td>
                    <%--<td>
                        <asp:Button ID="Button4" runat="server" CssClass="btnAudit" OnClientClick=<%# "return ShowDialog('DepartmentAffairView.aspx?Mode=Audit&AdjustType="+Server.UrlEncode(Eval("AdjustType").ToString())+"&ID=" + Eval("ID") + "', 750, 500, '');"%> />
                    </td>--%>                     
                    <td>
                      <%--  <cc1:CCHRButton ID="Button5" runat="server" CssClass="btnCancle" OnClientClick=<%# "return ShowDialog('../../DepartmentAffair/DepartmentAffairView.aspx?Mode=Cancle&AdjustType="+Server.UrlEncode(Eval("AdjustType").ToString())+"&ID=" + Eval("ID") + "', 750, 500, '');"%> 
                            OperateNo="002.004.006" IsProtect="true" />--%>
                    </td>         
                </tr>
            </ItemTemplate>
            <EmptyItemTemplate>
                <table id="Table1" runat="server" style="">
                    <tr>
                        <td>
                            没有数据!
                        </td>
                    </tr>
                </table>
            </EmptyItemTemplate>
        </asp:ListView>

        <uc1:UCPager ID="UCPager1" runat="server" PagedControlID="dataListView" PageSize="20" />
<%--        <uc1:ucpager ID="UCPager1" runat="server" PagedControlID="dataListView" 
            PageSize="20" />--%>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            SelectMethod="GetKQApplyListByCondition" 
            TypeName="WF.ViewModels.Workflow.KQApply.ApplyListVM">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtFolio" Name="folio"
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtDateStart" Name="beginDate" 
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtDateEnd" Name="endDate" 
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="ddlFlagStatus" Name="flowState" 
                    PropertyName="Text" Type="String" />                
                <asp:ControlParameter Name="isMine" ControlID="cbxIsMine" PropertyName="Checked"
                    Type="Boolean" />               
                <asp:ControlParameter Name="isCanQuery" ControlID="cbxIsCanQuery" PropertyName="Checked"
                    Type="Boolean" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>  
</asp:Content>
